-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[full-ci] Add global loading indicator for long running tasks #8611
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
834db33
to
f42a82a
Compare
Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/33666/32/1 |
b61393f
to
4b7ecae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like where this is going - thanks for taking the time to try the "addTask
approach" I suggested.
Visual improvement proposal
screenshot_000621.mp4 |
42547e5
to
013998e
Compare
3b8a325
to
9e70a19
Compare
81da650
to
a2b7c91
Compare
a2b7c91
to
c7e43de
Compare
c7e43de
to
e404ff6
Compare
Kudos, SonarCloud Quality Gate passed! |
return loadingService.addTask( | ||
({ setProgress }) => { | ||
return restoreResources(space, resolvedResources, missingFolderPaths, { setProgress }) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to destructure and build a new object, but not so important
Description
Adds a global loading indicator for long running actions at the top of the page.
How to use it (for devs)
Simply wrap your Promise in the
addTask
method provided by theloadingService
:The method also provides a callback
setProgress
which can be used to update the progress of a task.The following options can be provided to
addTask
:debounceTime
- Time until the loading state for a task is set active. Defaults to200
msindeterminate
- Determines if the task is in an indeterminate state. Defaults totrue
.Note that the loading bar won't show a progress when at least one task is in an indeterminate state.
Thx to @dschmidt for helping me out with the task adding & handling!
Video
loadingBar.mov
Related Issue
Types of changes